UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LLztIVhETLhgCOQB5mtQIzGYsZ2BB2Ya+oeoOPHMh4g='
WHERE
key_id = '19c6bb0a421af8033d413990167573067d096849f3dfa3fad2a8b955de4fbb89'
AND (
token = 'LLztIVhETLhgCOQB5mtQIzGYsZ2BB2Ya+oeoOPHMh4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)