UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ln2gsrsVJlZUK/WMVMGsRNFnDyJ8yEeLG702YeJXgAs=' 
WHERE 
  key_id = '6efb466d52a167608893f06288ca2bfaa913b8a8c121c474f151e10e3caf36f8' 
  AND (
    token = 'ln2gsrsVJlZUK/WMVMGsRNFnDyJ8yEeLG702YeJXgAs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020