UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GS+mndg44nzFlqyafYS6mqhiz8mabN/LDQGysa4O3Cc='
WHERE
key_id = '3f904df2dc4d12cbafcb4920bd84903856602ace424d39d1d7873efd1dcafc25'
AND (
token = 'GS+mndg44nzFlqyafYS6mqhiz8mabN/LDQGysa4O3Cc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)