UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FwzXnShiQY2Qc01nAMLLwxZgQW5+8JvsfwLL7JZY6eA='
WHERE
key_id = 'e182cfab7506290715d90a806b8b598b534edceb898883c479fc8c05a861dc95'
AND (
token = 'FwzXnShiQY2Qc01nAMLLwxZgQW5+8JvsfwLL7JZY6eA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)