UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EM9uEce6IxAYF0yq7P2+xbQcVVe/bA7A5IGdvVxbjXI='
WHERE
key_id = '32a6ed0264dba8b4b5bb18c74c3b7ee79d1728cf7211a5ef4d33327b4972c4f6'
AND (
token = 'EM9uEce6IxAYF0yq7P2+xbQcVVe/bA7A5IGdvVxbjXI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)