UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hHiKWin7kvr1OkzVqg6MZdpKpOeYCG4/Q2xljKeVeyU=' 
WHERE 
  key_id = '928353e7336567ca7f4c91f944b04c4be93cc3b78aaa5989738dfbe9ed7d00cc' 
  AND (
    token = 'hHiKWin7kvr1OkzVqg6MZdpKpOeYCG4/Q2xljKeVeyU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039