UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4eeE4IfHavicd/wHc3fuupA0u+3pCwNKUAzfCyuMJ8c=' 
WHERE 
  key_id = '2eb724348a6af0c56a10937bf87eee93271d6a3fdedb9c003aea0ed59ac6d6c2' 
  AND (
    token = '4eeE4IfHavicd/wHc3fuupA0u+3pCwNKUAzfCyuMJ8c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043