UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vxpTuwA5rr0Rpv1An2Yb/62ypNKfAIW3VS80CZ9kLEo=' 
WHERE 
  key_id = 'e5e57fe105743e11ae4ca41deb0e4e7b9eec9caf38ac0a9170b00207b95e3fa6' 
  AND (
    token = 'vxpTuwA5rr0Rpv1An2Yb/62ypNKfAIW3VS80CZ9kLEo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058