UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VQKpJxJX4igzH0yc/nzmVUu15bVdg9MhXuSLnE+v1JY=' 
WHERE 
  key_id = '1069213c23dc018d6b1c33f0497c964330d085addf8ad66886fc319c9d9ee9da' 
  AND (
    token = 'VQKpJxJX4igzH0yc/nzmVUu15bVdg9MhXuSLnE+v1JY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042