UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iZFxtc2y4jMY3/oErtHcCMjBjf698TXuN2KV6OUeJt8='
WHERE
key_id = '35426dbda2fceedbe0bf083755a2da74906ffa3487803c0ec49e8a6f9cbd413d'
AND (
token = 'iZFxtc2y4jMY3/oErtHcCMjBjf698TXuN2KV6OUeJt8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)