UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4t9Bn4CFZ5iWSVNOjAGQNybl+C44n6dH5lfvspU/9m8='
WHERE
key_id = '71b3e8bb9fc8610ba78125886f3406158340797d94066989362960f868da93e8'
AND (
token = '4t9Bn4CFZ5iWSVNOjAGQNybl+C44n6dH5lfvspU/9m8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)