UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jrcWHlhGTT6awqB20RTZljq1D2zC8Tio7b4uZ2hM/YM=' 
WHERE 
  key_id = 'dc9e0bf755f7d0e473b66a5b8454ae92affc49cbad027d23e033caa8156e27db' 
  AND (
    token = 'jrcWHlhGTT6awqB20RTZljq1D2zC8Tio7b4uZ2hM/YM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020