UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kBosLxC59KwuwZmLtZNxwHBxNPFOJKqb+nGhRSxVnbs=' 
WHERE 
  key_id = 'f69d3277a966c786ba5f2a14acaa3271e660ee0a71b5a25c3de7fe29d5b3eefe' 
  AND (
    token = 'kBosLxC59KwuwZmLtZNxwHBxNPFOJKqb+nGhRSxVnbs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028