UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IFaOC76QmutEI6g7e0b3CkGLFSRJbggLpEknv5/BFFA='
WHERE
key_id = '631554af5b1d5a399eaf372793ad87fdf91356ee38ca7c51f8d44dcf8532c6dc'
AND (
token = 'IFaOC76QmutEI6g7e0b3CkGLFSRJbggLpEknv5/BFFA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)