UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yFHVgE/mhI62VFdC4yd2py7Ap/ReV/tbftiiVDgkLx8='
WHERE
key_id = '28887c1db52a3c8670e1b54d47380ecd8028277aee572846d73be853cdc45758'
AND (
token = 'yFHVgE/mhI62VFdC4yd2py7Ap/ReV/tbftiiVDgkLx8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)