UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8VOl0K1oRxLu0eAIwwkeEs/vR/IVIwSuk6hPw5clzdE=' 
WHERE 
  key_id = '57be072a29b84d8a2e0f6353fdd63e5df994eaf489d8db30409d4e9a49ff3825' 
  AND (
    token = '8VOl0K1oRxLu0eAIwwkeEs/vR/IVIwSuk6hPw5clzdE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048