UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'J76x5QI0IBPa/mb4mDijqNQDonpFxLgn3oRcaYF4Ge0=' 
WHERE 
  key_id = '36bd23ae32f430b69d8eee111a74d585c0e1b87a688de8705241f6e2bd06e002' 
  AND (
    token = 'J76x5QI0IBPa/mb4mDijqNQDonpFxLgn3oRcaYF4Ge0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031