UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+ZCD89pPoFFq69ev7lDeqC9RPDVux1kajO6P9iBIY0M=' 
WHERE 
  key_id = 'e9ec8da95938d8810ebdac74dc3089739c2421c86ad27852ad76867ec322e1e8' 
  AND (
    token = '+ZCD89pPoFFq69ev7lDeqC9RPDVux1kajO6P9iBIY0M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040