UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eaoCIs72Pp/xCojM3vYSD7zkSG16oIKnNNslCju6Lv0=' 
WHERE 
  key_id = '503e8f9d1d10643e5b94a922799bac98fa9fbe8afe7d762f411c2ac6e4081f88' 
  AND (
    token = 'eaoCIs72Pp/xCojM3vYSD7zkSG16oIKnNNslCju6Lv0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049