UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FHof3eIqPr6QRr6XF9Y7qB/HSLZJzNVYd80IPfjHdvI='
WHERE
key_id = '794feaf506bc11fdbe5bcf75d07025b342c017dc373d358aa3206aa71e0c0570'
AND (
token = 'FHof3eIqPr6QRr6XF9Y7qB/HSLZJzNVYd80IPfjHdvI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)