UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '66pxkiMLzLzOrQ5zRly/PG3rYmy5NkOtfAyCFAZRyPw='
WHERE
key_id = '619fc05c6a3afabd7bbee336f615dd95a3750087c61bcb911a532f21fa601f63'
AND (
token = '66pxkiMLzLzOrQ5zRly/PG3rYmy5NkOtfAyCFAZRyPw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)