UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'D/o3XAtABxutXEg31KTxrJqMw76GdFtR2PQ7f1H2KW8=' 
WHERE 
  key_id = 'a35e9022a923c30bb53b634e211dc300b5d1bb4aa314e7dba630cbbc7b996db6' 
  AND (
    token = 'D/o3XAtABxutXEg31KTxrJqMw76GdFtR2PQ7f1H2KW8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039