UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'k9IFFlaJvBWwlB5FAM//R3Lpu+clthesJnh1l+6ytwY='
WHERE
key_id = '9dd10381ac5ca018debeb7293b6787b7192e93ae1e3bbcae39c9d0f65d1e73bf'
AND (
token = 'k9IFFlaJvBWwlB5FAM//R3Lpu+clthesJnh1l+6ytwY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)