UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OXQa19k8HLZOyRM7k/naL4L3iSPn9cv9F2WApcXhNvk=' 
WHERE 
  key_id = '1c18b47efc89971e1805d72897212a6a0d1749dde32b93e91bc7ed97c9257749' 
  AND (
    token = 'OXQa19k8HLZOyRM7k/naL4L3iSPn9cv9F2WApcXhNvk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00121