UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U4v5Y18xgBdrOWI/336DWLpPZs9ZvANK9l6X5nd4AKU=' 
WHERE 
  key_id = '90ac1b4793006dbcf44a488bd97885bb4bd471dd27ce7bf3c19cbb02b5059b06' 
  AND (
    token = 'U4v5Y18xgBdrOWI/336DWLpPZs9ZvANK9l6X5nd4AKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031