UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1i28CxGiHf1zeyZPTMv4LMYh44BihSsfm5AyrvpOnVA=' 
WHERE 
  key_id = '71bbbc4ea2491518e45817a4dbdc1c9b3e690b6916f3fdc367ac636240da07d9' 
  AND (
    token = '1i28CxGiHf1zeyZPTMv4LMYh44BihSsfm5AyrvpOnVA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036