UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/70Om++Bc/HlYiUO2s+cEwVQ3StsxxMnCPWlJSeRw6o=' 
WHERE 
  key_id = '9db72ae6cca4137ecda69e167b0c49a6ca5fe7600cecdc5977c89832a2f50f21' 
  AND (
    token = '/70Om++Bc/HlYiUO2s+cEwVQ3StsxxMnCPWlJSeRw6o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00068