UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EdESMmu73bnLk+m9f/eiQGhPXRYrK7CTESL3j95HYlY=' 
WHERE 
  key_id = '88cde84a761f612ee165ae32a5da378309b4f587780a36b23d4bdf7e220bf74b' 
  AND (
    token = 'EdESMmu73bnLk+m9f/eiQGhPXRYrK7CTESL3j95HYlY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043