UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9Ex7wxgNhlfDq9f/6xUhokjYZUum3LrIiAR9v59Sjc0=' 
WHERE 
  key_id = '93d099ad1765b91953dd11979f5973b1e9c2ef83b9590d8fca301dc92247c9eb' 
  AND (
    token = '9Ex7wxgNhlfDq9f/6xUhokjYZUum3LrIiAR9v59Sjc0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018