UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3AiCzwh+mGUhXFdiDj2lhGk9u/cCkvvOPKpmGtiYUsY='
WHERE
key_id = '44bbf690ebee87804df79e0b89d6287ff61a399c58a98a586451199ef63b9b32'
AND (
token = '3AiCzwh+mGUhXFdiDj2lhGk9u/cCkvvOPKpmGtiYUsY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)