UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OCt7RE+D27AuWpjj3pGrMBhb2NWl2h8IuXAGR/EWGfU=' 
WHERE 
  key_id = '9ec0fdae396f6d08bd4e611b66380a83c89cb8c15b71b5030bab7daa883560da' 
  AND (
    token = 'OCt7RE+D27AuWpjj3pGrMBhb2NWl2h8IuXAGR/EWGfU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034