UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1ocEM9aLHuyb13zfwl/KwMIc/We3TIjQv+AKf6tMAEo=' 
WHERE 
  key_id = '2a3e565ffac737967690c82e2a2179164e180a85db1cfb602f968778ae317a5c' 
  AND (
    token = '1ocEM9aLHuyb13zfwl/KwMIc/We3TIjQv+AKf6tMAEo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035