UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ljgWTqy5ekJgYv9kmQ/ZSISZlgLtHU2OGzf4mxJ3KJ4='
WHERE
key_id = '64b6742fe4c4dc2519898019aa7037befd9d3144db7e7ff3d96fb20fc4954db9'
AND (
token = 'ljgWTqy5ekJgYv9kmQ/ZSISZlgLtHU2OGzf4mxJ3KJ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)