UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rxDxiaQ7Sf6uQH5Rf/cMrfq0jAji9H9VQ8qQ3w+VDgA=' 
WHERE 
  key_id = '2e88648232ba078911c0b6d693cc46ebad587432d6a7888e52d8ee11855b5d26' 
  AND (
    token = 'rxDxiaQ7Sf6uQH5Rf/cMrfq0jAji9H9VQ8qQ3w+VDgA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028