UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '69VAYaFRQid+gZBXtFug7uIojHzdLEvjrXEAE7vq8nU=' 
WHERE 
  key_id = '79db3b0fa367988bf9e1918a3a3644aba9605a285027fa562e42dd5a8f2ae698' 
  AND (
    token = '69VAYaFRQid+gZBXtFug7uIojHzdLEvjrXEAE7vq8nU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033