UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nBjLPUlF5qkPFrZkowRB/XvbYAZGImRgQA7uLJ/RUYE='
WHERE
key_id = 'fe3f4a0dd881a9239cb83037ab28a67f321fcdf1eb889dd545bd8f05a713e51b'
AND (
token = 'nBjLPUlF5qkPFrZkowRB/XvbYAZGImRgQA7uLJ/RUYE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)