UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tc9KMtR+HsFuu4p8hO5ueOey81OoLX0YItVueH2nLqA=' 
WHERE 
  key_id = '79e8fec081b7903f1e4c6c2ab4fb51009d89e4f3fa748a2ac250973958a8c97f' 
  AND (
    token = 'tc9KMtR+HsFuu4p8hO5ueOey81OoLX0YItVueH2nLqA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00085